<!DOCTYPE html>
<html>
<head>
	<meta charset="UTF-8">
	<title></title>
	<include file="Public/header" />
</head>
<body>
<script type="text/javascript">
	
	var confirmEditGoodsUrl="{:U('Stock/confirm_editgoods')}";//确认上架
	var goodspushUrl="{:U('Pushsendapi/synch_goods')}";//推送库存信息
	
	var goodsbatchlistUrl="{:U('Order/goods_batch_list')}"//商品批次详情链接

	<!-- using('../../../default/js/goods.js'); -->
	var getgoodslistUrl="{:U('Stock/get_goodslist')}";//商品信息
</script>
<script type="text/javascript" src="__PUBLIC__/default/js/goods.js"></script>

	<table id="goodsDatagrid" toolbar="#goods_tb"></table>
    <!-- 搜索栏 -->
    <div id="goods_tb">
        <form id="goodsSearchForm" method="post" novalidate>
             <a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon icon-all" plain="true" onclick="goodsObj.showAll()">全部</a>
            商品编码:<input class="easyui-textbox" name="goods_no" style="width:150px;height:30px;"> 
			商品名称:<input class="easyui-textbox" name="goods_name" style="width:150px;height:30px;"> 
			条形码:<input class="easyui-textbox" name="bar_code" style="width:150px;height:30px;">
			<a href="#" class="easyui-linkbutton searchBar" iconCls="icon-search" style="height:30px;">搜索</a>
        </form>

        <a href="javascript:void(0)" onclick="goodsObj.infoBar()" class="easyui-linkbutton" data-options="iconCls:'icon-information',plain:true">详情</a>
		<a href="javascript:void(0)" onclick="goodsObj.reloadBar()" class="easyui-linkbutton" data-options="iconCls:'icon-reload',plain:true">刷新</a>

    </div>
    <!-- /搜索栏 -->
	<!-- 编辑-->
    <div id="goodsEditDialog" class="easyui-dialog" style="width:400px;padding:10px 20px"
            closed="true" buttons="#goodsEditButtons"  modal="true">
        <form id="goodsEditForm" method="post" novalidate>          
            <div class="fitem">
                <label>商品编码</label>
                <input name="id" type="hidden" />
                <input name="goods_no" class="easyui-textbox" data-options="disabled:true,height:30,editor:'numberbox'" />
            </div>
            <div class="fitem">
                <label>商品名称</label>
                <input name="goods_name" class="easyui-textbox" data-options="height:30" />
            </div>
			<div class="fitem">
                <label>条形码</label>
                <input name="bar_code" class="easyui-textbox" data-options="required:true,delay:1000,height:30,validType:['length[2,30]']" />
            </div>
			<div class="fitem">
                <label>规格</label>
                <input name="goods_spec" class="easyui-textbox" data-options="height:30" />
            </div>
			
			<div class="fitem">
                <label>库存数量</label>
                <input name="amount" class="easyui-textbox" data-options="height:30" />
            </div>
			<div class="fitem">
                <label>合格品</label>
                <input name="conforming_p" class="easyui-textbox" data-options="height:30" />
            </div>
			<div class="fitem">
                <label>残次品</label>
                <input name="nonconforming_p" class="easyui-textbox" data-options="height:30" />
            </div>
			<div class="fitem">
                <label>报废品</label>
                <input name="scrap_one" class="easyui-textbox" data-options="height:30" />
            </div>
			<div class="fitem">
                <label>商品类型</label>
                <select class="easyui-combobox" name="goods_cate" id="goods_goods_cate" style="width:70px;height:30px;" data-options="required:true,editable:false,panelHeight:'false',validType:['length[2,30]','selected[]']">
                        <option value="1">一般商品</option>
						<option value="2">原料</option>
						<option value="3">辅料</option>
                </select>
            </div>
        </form>
    </div>
    <div id="goodsEditButtons">
        <a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-ok" onclick="goodsObj.save('{:U('Stock/confirm_editgoods')}')" style="width:90px">确认</a>
        <a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-cancel" onclick="javascript:
    $('#goodsEditDialog').dialog('close')" style="width:90px">取消</a>
    </div>
    <!-- /编辑 -->  
</body>